import { createRouter,createWebHistory } from "vue-router";
import Index from '../views/Index.vue'
  

const routes = [
    //系统首页
    {
        path:"/",
        component:Index,
        //配置Index子路由
        redirect:'/home',
        children:[
            //系统主页vue
            {path:"/home",component:()=> import('@/views/index_vue/Home.vue') },
            //妆造预览
            {path:"/rouge",component:()=> import('@/views/index_vue/Rouge.vue')},
            //妆造预览
            {path:"/make",component:()=> import('@/views/index_vue/Make.vue')},
            //选片预约：就是预约记录查询，以及出片情况
            {path:"/record",component:()=> import('@/views/index_vue/Record.vue')},
            //个人中心，改个用户名啥的 根本就没写密码 所以不需要改密码 
            {path:"/user",component:()=> import('@/views/index_vue/User.vue')},
        ]
    },
    {
        //登录
        path:"/login",
        component:()=> import('@/views/login.vue')
    },
    {
        //管理员窗口
        path:"/manager",
        component:()=> import('@/views/Manager.vue'),
        //配置子路由
        redirect:'/staff',
        children:[
            {path:"/users",component:()=> import('@/views/manager_vue/Users.vue')},
            {path:"/staff",component:()=> import('@/views/manager_vue/Staff.vue')},
            {path:"/managerRecord",component:()=> import('@/views/manager_vue/ManagerRecord.vue')},
            {path:"/anMake",component:()=> import('@/views/manager_vue/AnMake.vue')},
            {path:"/anPhoto",component:()=> import('@/views/manager_vue/PhotoManager.vue')},
            {path:"/makeManager",component:()=> import('@/views/manager_vue/MakeManager.vue')},
            {path:"/styleManager",component:()=> import('@/views/manager_vue/StyleManager.vue')},
        ]
    },
    {
        //管理员窗口
        path:"/mStaff",
        component:()=> import('@/views/mStaff.vue'),
        //配置子路由
        redirect:'/staffRecord',
        children:[
            {path:"/staffRecord",component:()=> import('@/views/manager_vue/ManagerRecord.vue')},
            {path:"/staffMake",component:()=> import('@/views/manager_vue/AnMake.vue')},
            {path:"/onUser",component:()=> import('@/views/manager_vue/OnUser.vue')},
        ]
    }


]


const router = createRouter({
    history:createWebHistory(),
    routes
})
export default router;
